import http from "@/http/index.ts"
import {SoftwareSetting,SoftwareWarehouse,SoftwareWarehouseListParam,SoftwareSettingListParam} from '@/api/software/type.ts'


// 新增仓库
export const addApi = (data: SoftwareWarehouse) => {
    return http.post("/software/createSoftwareWarehouse", data)
}


// 分页条件查询列表
export const getListApi = (data:SoftwareWarehouseListParam) => {
    return http.get("/software/getSoftwareWarehouseList",data)
}

// 分页条件查询列表
export const getSettingListApi = (data:SoftwareSettingListParam) => {
    return http.get("/software/getSoftwareSettingList",data)
}


// 编辑
export const editApi = (data: SoftwareWarehouse) => {
    return http.put("/software/updateSoftwareWarehouse", data)
}

// 删除
export const deleteApi = (id: number) => {
    return http.delete(`/software/deleteSoftwareWarehouse/${id}`)
}

// 精简列表
export const getSimpleListApi = () => {
    return http.get("/software/simpleList")
}

// 新增工序
export const addSettingApi = (data: SoftwareSetting) => {
    return http.post("/software/createSoftwareSetting", data)
}

// 编辑
export const editSettingApi = (data: SoftwareSetting) => {
    return http.put("/software/updateSoftwareSetting", data)
}


// 删除
export const deleteSettingApi = (id: number) => {
    return http.delete(`/software/deleteSoftwareSetting/${id}`)
}